<template>
  <el-card shadow="hover">
    <template #header>
      <nav class="flex justify-between">
        <strong>二维码</strong>
        <el-link href="https://github.com/soldair/node-qrcode" target="_blank" type="primary">qrcode</el-link>
      </nav>
    </template>
    <el-image :src="url"></el-image>


  </el-card>
</template>

<script lang="ts" name="qrcode" setup>
//pnpm add qrcode @types/qrcode
import QRCode from 'qrcode'

let url = shallowRef()
QRCode.toDataURL('http://47.108.150.53/app?code=252437').then(res => {
  url.value = res
}).catch(err => {
  console.error(err)
})
</script>

<style lang="less" scoped>

</style>
